package cn.cxy.demo

import android.app.Service
import android.content.Intent
import android.os.Binder
import android.os.IBinder
import android.util.Log

class MyService : Service() {
    inner class MyBinder : Binder() {

        fun study() {
            Log.d("MyService", "开始学习")
        }

        fun getProgress() {
            Log.d("MyService", "当前进度：50%")
        }
    }

    private val binder = MyBinder()
    override fun onBind(intent: Intent?): IBinder? {
        return binder
    }
}